package com.ctg.payroll2.service.payment.impl;

import com.ctg.payroll2.bean.filter.payment.PbSysfunctionFilter;
import com.ctg.payroll2.dao.payment.PbSysfunctionDao;
import com.ctg.payroll2.service.BaseService;
import com.ctg.payroll2.service.payment.PbSysfunctionService;
import com.ctg.platform.util.Page;

public class PbSysfunctionServiceImp extends BaseService implements
		PbSysfunctionService {
	private PbSysfunctionDao dao;

	/**
	 * @param dao 设置dao
	 */
	public void setDao(PbSysfunctionDao dao) {
		this.dao = dao;
	}
	
	public Page getPbSysfunctionListByType(PbSysfunctionFilter filter){
		Page page = new Page();
		page = dao.getPbSysfunctionListByType(filter);
		return page;
	}
	
	public Page querypbSysfunctionBySocialFilter(PbSysfunctionFilter filter){
		Page page = new Page();
		if (filter==null) {
			return null;
		}else{
			String str = filter.getSocialFunType();
			if (filter.getFunctionClass().equals("")) {
				page = dao.querypbSysfunctionByNullMemo(filter);
			}else
			if (str.equalsIgnoreCase("SocialItem")) {
				page = dao.querypbSysfunctionBySocialItem(filter);
			}else
			if (str.equalsIgnoreCase("SocialType")) {
				page = dao.querypbSysfunctionBySocialType(filter);
//				System.out.println("");
			}
		}
		return page;
	}
}
